﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FinModel
{
    public class Future : Instrument
    {
        public double Strike { get; set; }
        /// <summary>
        /// Price the future
        /// </summary>
        /// <param name="underlyingPrice">current underlying price</param>
        /// <param name="futurePrice">current future price</param>
        /// <param name="r">defined interest rate</param>
        /// <returns></returns>
        public double Price(double underlyingPrice, double futurePrice, double r)
        {
            throw new NotImplementedException();
        }

        public class Basis
        {
            public double UnderlyingPrice { get; set; }
            public double FuturePrice { get; set; }

            public static explicit operator double(Basis basis)
            {
                return basis.UnderlyingPrice - basis.FuturePrice;
            }
        }
    }
}
